﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SearchProduct.ascx.cs" Inherits="HCFramework.Product.FrontEndControl.SearchProduct" %>
<%=M.Common.GetLang("Tìm kiếm")%>:
<asp:TextBox ID="txtSearchProduct" CssClass="txtSearchProduct" runat="server"></asp:TextBox>
<script type="text/javascript">
    $(document).ready(function () {
        $(".txtSearchProduct").autocomplete("/Product/Ajax/GetListProductName.aspx?categoryID=" + GetPara(document.URL,"categoryID"));
        $(".txtSearchProduct").watermark(<%="'" + M.Common.GetLang("Tên sản phẩm") + "'"%>);
        $(".txtSearchProduct").keypress(function (e) {
            var code = (e.keyCode ? e.keyCode : e.which);
            if (code == 13) {
                var url = document.URL;
                var keyword = $(this).val();
                url = SetPara(url, "search", keyword);
                window.location = url;
                return false;
            }
        });

    });
</script>
